# Maintainer: Luca Weiss <luca@z3ntu.xyz>
pkgname=libqtdbustest
pkgver=0.3.2
pkgrel=0
pkgdesc='Library for testing DBus interactions using Qt'
url='https://gitlab.com/ubports/development/core/libqtdbustest'
arch="all"
license="LGPL-3.0-only"
makedepends="
	cmake
	cmake-extras
	gmock
	gtest-dev
	qt5-qtbase-dev
	samurai
	"
checkdepends="
	dbus-x11
	procps
	py3-dbusmock
	"
source="https://gitlab.com/ubports/development/core/libqtdbustest/-/archive/$pkgver/libqtdbustest-$pkgver.tar.gz"

build() {
	cmake -B build -G Ninja \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib \
		-DBUILD_SHARED_LIBS=ON \
		-DCMAKE_BUILD_TYPE=None
	cmake --build build
}

check() {
	ctest --test-dir build --output-on-failure
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
963b13f7ea3ad5003b5bf9af1421959c0028b43e8ac52b6f74ee9a1260cb586c753342c689b6f3d78d54f01f549f16e81739eaee53f2753b813d5e1e5132baf6  libqtdbustest-0.3.2.tar.gz
"
